
import {mapGetters } from 'vuex' 
export default {
	computed: {
		...mapGetters(['total'])
	},
    watch:{
		// total(){
			
		// }
	},
	onShow(){
		if(this.total){
			this.handleTabBarBadge()
		}
		
	},
	methods:{
		handleTabBarBadge(){
			uni.setTabBarBadge({
			  index: 3,
			  text:this.total+''//text 必须是字符串
			})
		},
	}
}